package test_2024_4_12_01_java;

public class Box {

	private double width;
	private double length;
	private double height;
	
	
	//有参构造方法 & 初始化
	public Box(double width, double length, double height) {
		this.width = width;
        this.length = length;
        this.height = height;
	}
	
	public void showBox() {	
		
		System.out.println(width + "\r\n" + length + "\r\n" + height);
		//System.out.println(length);
		//System.out.println(height);
	}
	
	public static void main(String[] args) {
		
		Box myBox = new Box(10.0,20.0,30.0);
		myBox.showBox();
		
		
		
	}
}
